home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / ijc / ijc.bst < prev    next >
Text File  |  1993-08-02  |  18KB  |  978 lines

  1. % BibTeX bibliography style `ICJ'
  2.     % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
  3.     % Copyright (C) 1985, all rights reserved.
  4.     % Copying of this file is authorized only if either
  5.     % (1) you make absolutely no changes to your copy, including name, or
  6.     % (2) if you do make changes, you name it something other than
  7.     % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
  8.     % This restriction helps ensure that all standard styles are identical.
  9.     % The file btxbst.doc has the documentation for this style.    
  10.     % Modified from unsrt.bib by Silvano Balemi balemi@aut.ee.ethz.ch for
  11.     % articles in International Journal of Control        5.June.91 
  12.  
  13. ENTRY
  14.   { address
  15.     author
  16.     booktitle
  17.     chapter
  18.     edition
  19.     editor
  20.     howpublished
  21.     institution
  22.     journal
  23.     key
  24.     month
  25.     note
  26.     number
  27.     organization
  28.     pages
  29.     publisher
  30.     school
  31.     series
  32.     title
  33.     type
  34.     volume
  35.     year
  36.   }
  37.   {}
  38.   { label }
  39.  
  40. INTEGERS { output.state before.all mid.sentence after.sentence after.block }
  41.  
  42. FUNCTION {init.state.consts}
  43. { #0 'before.all :=
  44.   #1 'mid.sentence :=
  45.   #2 'after.sentence :=
  46.   #3 'after.block :=
  47. }
  48.  
  49. STRINGS { s t }
  50.  
  51. FUNCTION {output.nonnull}
  52. { 's :=
  53.   output.state mid.sentence =
  54.     { ", " * write$ }
  55.     { output.state after.block =
  56. % next line commented out by rhr and changed to write comma
  57. %    { add.period$ write$
  58.     { ", " * write$ 
  59.       newline$
  60.       "\newblock " write$
  61.     }
  62.     { output.state before.all =
  63.         'write$
  64.         { add.period$ " " * write$ }
  65.       if$
  66.     }
  67.       if$
  68.       mid.sentence 'output.state :=
  69.     }
  70.   if$
  71.   s
  72. }
  73.  
  74. FUNCTION {output}
  75. { duplicate$ empty$
  76.     'pop$
  77.     'output.nonnull
  78.   if$
  79. }
  80.  
  81. FUNCTION {output.check}
  82. { 't :=
  83.   duplicate$ empty$
  84.     { pop$ "empty " t * " in " * cite$ * warning$ }
  85.     'output.nonnull
  86.   if$
  87. }
  88.  
  89.  
  90. FUNCTION {output.bibitem}
  91.   newline$
  92.   "\bibitem[" write$
  93.    year write$ 
  94.  "]{" write$
  95.   cite$ write$
  96.   "}" write$
  97.   newline$
  98.   ""
  99.   before.all 'output.state :=
  100. }
  101.  
  102. FUNCTION {fin.entry}
  103. { add.period$
  104.   write$
  105.   newline$
  106. }
  107.  
  108. % 5/24/89 rhr
  109. %  modified fin.entry function - prints note field after body of entry  
  110. %FUNCTION {fin.entry}
  111. %{ add.period$
  112. %  note empty$
  113. %    'write$
  114. %    { "\par\bgroup\parindent=0em  " * annote * "\par\egroup " * write$
  115. %    }
  116. %  if$
  117. %  newline$
  118. %}
  119.  
  120. FUNCTION {new.block}
  121. { output.state before.all =
  122.     'skip$
  123.     { after.block 'output.state := }
  124.   if$
  125. }
  126.  
  127. FUNCTION {new.sentence}
  128. { output.state after.block =
  129.     'skip$
  130.     { output.state before.all =
  131.     'skip$
  132.     { after.sentence 'output.state := }
  133.       if$
  134.     }
  135.   if$
  136. }
  137.  
  138. FUNCTION {not}
  139. {   { #0 }
  140.     { #1 }
  141.   if$
  142. }
  143.  
  144. FUNCTION {and}
  145. {   'skip$
  146.     { pop$ #0 }
  147.   if$
  148. }
  149.  
  150. FUNCTION {or}
  151. {   { pop$ #1 }
  152.     'skip$
  153.   if$
  154. }
  155.  
  156. FUNCTION {new.block.checka}
  157. { empty$
  158.     'skip$
  159.     'new.block
  160.   if$
  161. }
  162.  
  163. FUNCTION {new.block.checkb}
  164. { empty$
  165.   swap$ empty$
  166.   and
  167.     'skip$
  168.     'new.block
  169.   if$
  170. }
  171.  
  172. FUNCTION {new.sentence.checka}
  173. { empty$
  174.     'skip$
  175.     'new.sentence
  176.   if$
  177. }
  178.  
  179. FUNCTION {new.sentence.checkb}
  180. { empty$
  181.   swap$ empty$
  182.   and
  183.     'skip$
  184.     'new.sentence
  185.   if$
  186. }
  187.  
  188. FUNCTION {field.or.null}
  189. { duplicate$ empty$
  190.     { pop$ "" }
  191.     'skip$
  192.   if$
  193. }
  194.  
  195. FUNCTION {emphasize}
  196. { duplicate$ empty$
  197.     { pop$ "" }
  198.     { "{\em " swap$ * "}" * }
  199.   if$
  200. }
  201.  
  202. FUNCTION {boldface}
  203. { duplicate$ empty$
  204.     { pop$ "" }
  205.     { "{\bf " swap$ * "}" * }
  206.   if$
  207. }
  208.  
  209. %FUNCTION {boldface}
  210. %{ 's swap$ :=
  211. %  s "" =
  212. %    { "" }
  213. %    { "{\bf " s * "}" * }
  214. %  if$
  215. %}
  216. %
  217. INTEGERS { nameptr namesleft numnames }
  218.  
  219.  
  220. FUNCTION {format.names}
  221. { 's :=
  222.   #1 'nameptr :=
  223.   s num.names$ 'numnames :=
  224.   numnames 'namesleft :=
  225.     { namesleft #0 > }
  226.     { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=
  227.       nameptr #1 >
  228.     { namesleft #1 >
  229.     { ", " * t * }
  230.         { numnames #2 >
  231.         { "" * }
  232.         'skip$
  233.           if$
  234.           t "others" =
  235.         { " {\rm et~al.}" * }
  236.         { " {\rm and} " * t * }
  237.           if$
  238.         }
  239.       if$
  240.     }
  241.     't
  242.       if$
  243.       nameptr #1 + 'nameptr :=
  244.       namesleft #1 - 'namesleft :=
  245.     }
  246.   while$
  247. }
  248.  
  249. FUNCTION {format.date}
  250. { year empty$
  251.     'year 
  252.     {" " year *}
  253.   if$
  254. }
  255.  
  256. FUNCTION {format.authors}
  257. { author empty$
  258.     { "" }
  259.     { "{\sc " * author format.names "}" * }
  260.   if$
  261. }
  262.  
  263. FUNCTION {format.editors}
  264. { editor empty$
  265.     { "" }
  266.     { editor format.names
  267.       editor num.names$ #1 >
  268.     { ", editors" * }
  269.     { ", editor" * }
  270.       if$
  271.     }
  272.   if$
  273. }
  274.  
  275. FUNCTION {format.title}
  276. { title empty$
  277.     { "" }
  278.     { title "t" change.case$ }
  279.   if$
  280. }
  281.  
  282. FUNCTION {n.dashify}
  283. { 't :=
  284.   ""
  285.     { t empty$ not }
  286.     { t #1 #1 substring$ "-" =
  287.     { t #1 #2 substring$ "--" = not
  288.         { "--" *
  289.           t #2 global.max$ substring$ 't :=
  290.         }
  291.         {   { t #1 #1 substring$ "-" = }
  292.         { "-" *
  293.           t #2 global.max$ substring$ 't :=
  294.         }
  295.           while$
  296.         }
  297.       if$
  298.     }
  299.     { t #1 #1 substring$ *
  300.       t #2 global.max$ substring$ 't :=
  301.     }
  302.       if$
  303.     }
  304.   while$
  305. }
  306.  
  307. FUNCTION {format.btitle}
  308. { title emphasize
  309. }
  310.  
  311. FUNCTION {tie.or.space.connect}
  312. { duplicate$ text.length$ #3 <
  313.     { "~" }
  314.     { " " }
  315.   if$
  316.   swap$ * *
  317. }
  318.  
  319. FUNCTION {either.or.check}
  320. { empty$
  321.     'pop$
  322.     { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  323.   if$
  324. }
  325.  
  326. FUNCTION {format.bvolume}
  327. { volume empty$
  328.     { "" }
  329.     { "volume" volume tie.or.space.connect
  330.       series empty$
  331.     'skip$
  332.     { " of " * series emphasize * }
  333.       if$
  334.       "volume and number" number either.or.check
  335.     }
  336.   if$
  337. }
  338.  
  339. FUNCTION {format.number.series}
  340. { volume empty$
  341.     { number empty$
  342.     { series field.or.null }
  343.     { output.state mid.sentence =
  344.         { "number" }
  345.         { "Number" }
  346.       if$
  347.       number tie.or.space.connect
  348.       series empty$
  349.         { "there's a number but no series in " cite$ * warning$ }
  350.         { " in " * series * }
  351.       if$
  352.     }
  353.       if$
  354.     }
  355.     { "" }
  356.   if$
  357. }
  358.  
  359. FUNCTION {format.edition}
  360. { edition empty$
  361.     { "" }
  362.     { output.state mid.sentence =
  363.     { edition "l" change.case$ " edition" * }
  364.     { edition "t" change.case$ " edition" * }
  365.       if$
  366.     }
  367.   if$
  368. }
  369.  
  370. INTEGERS { multiresult }
  371.  
  372. FUNCTION {multi.page.check}
  373. { 't :=
  374.   #0 'multiresult :=
  375.     { multiresult not
  376.       t empty$ not
  377.       and
  378.     }
  379.     { t #1 #1 substring$
  380.       duplicate$ "-" =
  381.       swap$ duplicate$ "," =
  382.       swap$ "+" =
  383.       or or
  384.     { #1 'multiresult := }
  385.     { t #2 global.max$ substring$ 't := }
  386.       if$
  387.     }
  388.   while$
  389.   multiresult
  390. }
  391.  
  392. FUNCTION {format.pages}
  393. { pages empty$
  394.     { "" }
  395.     { pages multi.page.check
  396.     { "pages" pages n.dashify tie.or.space.connect }
  397.     { "page" pages tie.or.space.connect }
  398.       if$
  399.     }
  400.   if$
  401. }
  402.  
  403. FUNCTION {format.vol.num.pages}
  404. %boldface added 3/17/87 rhr and removed for chem sty 9/9/89
  405. %{ volume field.or.null boldface
  406. { volume field.or.null 
  407.   number empty$
  408.     'skip$
  409.     { "(" number * ")" * *
  410.       volume empty$
  411.     { "there's a number but no volume in " cite$ * warning$ }
  412.     'skip$
  413.       if$
  414.     }
  415.   if$
  416.   pages empty$
  417.     'skip$
  418.     { duplicate$ empty$
  419.     { pop$ format.pages }
  420.     { ", " * pages n.dashify * }
  421.       if$
  422.     }
  423.   if$
  424. }
  425.  
  426. FUNCTION {format.chapter.pages}
  427. { chapter empty$
  428.     'format.pages
  429.     { type empty$
  430.     { "chapter" }
  431.     { type "l" change.case$ }
  432.       if$
  433.       chapter tie.or.space.connect
  434.       pages empty$
  435.     'skip$
  436.     { ", " * format.pages * }
  437.       if$
  438.     }
  439.   if$
  440. }
  441.  
  442. FUNCTION {format.in.ed.booktitle}
  443. { booktitle empty$
  444.     { "" }
  445.     { editor empty$
  446.     { "In " booktitle emphasize * }
  447.     { "In " format.editors * ", " * booktitle emphasize * }
  448.       if$
  449.     }
  450.   if$
  451. }
  452.  
  453. FUNCTION {empty.misc.check}
  454. { author empty$ title empty$ howpublished empty$
  455.   month empty$ year empty$ note empty$
  456.   and and and and and
  457.     { "all relevant fields are empty in " cite$ * warning$ }
  458.     'skip$
  459.   if$
  460. }
  461.  
  462. FUNCTION {format.thesis.type}
  463. { type empty$
  464.     'skip$
  465.     { pop$
  466.       type "t" change.case$
  467.     }
  468.   if$
  469. }
  470.  
  471. FUNCTION {format.tr.number}
  472. { type empty$
  473.     { "Technical Report" }
  474.     'type
  475.   if$
  476.   number empty$
  477.     { "t" change.case$ }
  478.     { number tie.or.space.connect }
  479.   if$
  480. }
  481.  
  482. FUNCTION {format.article.crossref}
  483. { key empty$
  484.     { journal empty$
  485.     { "need key or journal for " cite$ * " to crossref " * crossref *
  486.       warning$
  487.       ""
  488.     }
  489.     { "In {\em " journal * "\/}" * }
  490.       if$
  491.     }
  492.     { "In " key * }
  493.   if$
  494.   " \cite{" * crossref * "}" *
  495. }
  496.  
  497. FUNCTION {format.crossref.editor}
  498. { editor #1 "{vv~}{ll}" format.name$
  499.   editor num.names$ duplicate$
  500.   #2 >
  501.     { pop$ " et~al." * }
  502.     { #2 <
  503.     'skip$
  504.     { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  505.         { " et~al." * }
  506.         { " and " * editor #2 "{vv~}{ll}" format.name$ * }
  507.       if$
  508.     }
  509.       if$
  510.     }
  511.   if$
  512. }
  513.  
  514. FUNCTION {format.book.crossref}
  515. { volume empty$
  516.     { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  517.       "In "
  518.     }
  519.     { "Volume" volume tie.or.space.connect
  520.       " of " *
  521.     }
  522.   if$
  523.   editor empty$
  524.   editor field.or.null author field.or.null =
  525.   or
  526.     { key empty$
  527.     { series empty$
  528.         { "need editor, key, or series for " cite$ * " to crossref " *
  529.           crossref * warning$
  530.           "" *
  531.         }
  532.         { "{\em " * series * "\/}" * }
  533.       if$
  534.     }
  535.     { key * }
  536.       if$
  537.     }
  538.     { format.crossref.editor * }
  539.   if$
  540.   " \cite{" * crossref * "}" *
  541. }
  542.  
  543. FUNCTION {format.incoll.inproc.crossref}
  544. { editor empty$
  545.   editor field.or.null author field.or.null =
  546.   or
  547.     { key empty$
  548.     { booktitle empty$
  549.         { "need editor, key, or booktitle for " cite$ * " to crossref " *
  550.           crossref * warning$
  551.           ""
  552.         }
  553.         { "In {\em " booktitle * "\/}" * }
  554.       if$
  555.     }
  556.     { "In " key * }
  557.       if$
  558.     }
  559.     { "In " format.crossref.editor * }
  560.   if$
  561.   " \cite{" * crossref * "}" *
  562. }
  563.  
  564. FUNCTION {article}
  565. { output.bibitem
  566.   format.authors "author" output.check
  567.   format.date "year" output.check
  568.   new.block
  569.   format.title "title" output.check
  570.   new.block
  571.   crossref missing$
  572.     { journal emphasize "journal" output.check
  573.       format.vol.num.pages output
  574.     }
  575.     { format.article.crossref output.nonnull
  576.       format.pages output
  577.     }
  578.   if$
  579.   new.block
  580.   note output
  581.   fin.entry
  582. }
  583.  
  584. FUNCTION {book}
  585. { output.bibitem
  586.   author empty$
  587.     { format.editors "author and editor" output.check }
  588.     { format.authors output.nonnull
  589.       crossref missing$
  590.     { "author and editor" editor either.or.check }
  591.     'skip$
  592.       if$
  593.     }
  594.   if$
  595.   format.date "year" output.check
  596.   new.block
  597.   format.btitle "title" output.check
  598.   crossref missing$
  599.     { format.bvolume output
  600.       new.block
  601.       format.number.series output
  602.       new.sentence
  603.       publisher "publisher" output.check
  604.       address output
  605.     }
  606.     { new.block
  607.       format.book.crossref output.nonnull
  608.     }
  609.   if$
  610.   format.edition output
  611.   new.block
  612.   note output
  613.   fin.entry
  614. }
  615.  
  616. FUNCTION {booklet}
  617. { output.bibitem
  618.   format.authors output
  619.   new.block
  620.   format.title "title" output.check
  621.   howpublished address new.block.checkb
  622.   howpublished output
  623.   address output
  624.   format.date output
  625.   new.block
  626.   note output
  627.   fin.entry
  628. }
  629.  
  630. FUNCTION {inbook}
  631. { output.bibitem
  632.   author empty$
  633.     { format.editors "author and editor" output.check }
  634.     { format.authors output.nonnull
  635.       crossref missing$
  636.     { "author and editor" editor either.or.check }
  637.     'skip$
  638.       if$
  639.     }
  640.   if$
  641.   format.date "year" output.check
  642.   new.block
  643.   format.btitle "title" output.check
  644.   crossref missing$
  645.     { format.bvolume output
  646.       format.chapter.pages "chapter and pages" output.check
  647.       new.block
  648.       format.number.series output
  649.       new.sentence
  650.       publisher "publisher" output.check
  651.       address output
  652.     }
  653.     { format.chapter.pages "chapter and pages" output.check
  654.       new.block
  655.       format.book.crossref output.nonnull
  656.     }
  657.   if$
  658.   format.edition output
  659.   new.block
  660.   note output
  661.   fin.entry
  662. }
  663.  
  664. FUNCTION {incollection}
  665. { output.bibitem
  666.   format.authors "author" output.check
  667.   new.block
  668.   format.title "title" output.check
  669.   new.block
  670.   crossref missing$
  671.     { format.in.ed.booktitle "booktitle" output.check
  672.       format.bvolume output
  673.       format.number.series output
  674.       format.chapter.pages output
  675.       new.sentence
  676.       publisher "publisher" output.check
  677.       address output
  678.       format.edition output
  679.       format.date "year" output.check
  680.     }
  681.     { format.incoll.inproc.crossref output.nonnull
  682.       format.chapter.pages output
  683.     }
  684.   if$
  685.   new.block
  686.   note output
  687.   fin.entry
  688. }
  689.  
  690. FUNCTION {inproceedings}
  691. { output.bibitem
  692.   format.authors "author" output.check
  693.   format.date "year" output.check
  694.   new.block
  695.   format.title "title" output.check
  696.   new.block
  697.   crossref missing$
  698.     { format.in.ed.booktitle "booktitle" output.check
  699.       format.bvolume output
  700.       format.number.series output
  701.       format.pages output
  702.       address empty$
  703.     { organization publisher new.sentence.checkb
  704.       organization output
  705.       publisher output
  706.     }
  707.     { address output.nonnull
  708.       new.sentence
  709.       organization output
  710.       publisher output
  711.     }
  712.       if$
  713.     }
  714.     { format.incoll.inproc.crossref output.nonnull
  715.       format.pages output
  716.     }
  717.   if$
  718.   new.block
  719.   note output
  720.   fin.entry
  721. }
  722.  
  723. FUNCTION {conference} { inproceedings }
  724.  
  725. FUNCTION {manual}
  726. { output.bibitem
  727.   author empty$
  728.     { organization empty$
  729.     'skip$
  730.     { organization output.nonnull
  731.       address output
  732.     }
  733.       if$
  734.     }
  735.     { format.authors output.nonnull }
  736.   if$
  737.   format.date "year" output
  738.   new.block
  739.   format.btitle "title" output.check
  740.   author empty$
  741.     { organization empty$
  742.     { address new.block.checka
  743.       address output
  744.     }
  745.     'skip$
  746.       if$
  747.     }
  748.     { organization address new.block.checkb
  749.       organization output
  750.       address output
  751.     }
  752.   if$
  753.   format.edition output
  754.   new.block
  755.   note output
  756.   fin.entry
  757. }
  758.  
  759. FUNCTION {mastersthesis}
  760. { output.bibitem
  761.   format.authors "author" output.check
  762.   format.date "year" output.check
  763.   new.block
  764.   format.title "title" output.check
  765.   new.block
  766.   "Master's thesis" format.thesis.type output.nonnull
  767.   school "school" output.check
  768.   address output
  769.   new.block
  770.   note output
  771.   fin.entry
  772. }
  773.  
  774. FUNCTION {misc}
  775. { output.bibitem
  776.   format.authors output
  777.   format.date "year" output.check
  778.   title howpublished new.block.checkb
  779.   format.title output
  780.   howpublished new.block.checka
  781.   howpublished output
  782.   new.block
  783.   note output
  784.   fin.entry
  785.   empty.misc.check
  786. }
  787.  
  788. FUNCTION {phdthesis}
  789. { output.bibitem
  790.   format.authors "author" output.check
  791.   format.date "year" output.check
  792.   new.block
  793.   format.btitle "title" output.check
  794.   new.block
  795.   "PhD thesis" format.thesis.type output.nonnull
  796.   school "school" output.check
  797.   address output
  798.   new.block
  799.   note output
  800.   fin.entry
  801. }
  802.  
  803. FUNCTION {proceedings}
  804. { output.bibitem
  805.   editor empty$
  806.     { organization output }
  807.     { format.editors output.nonnull }
  808.   if$
  809.       format.date "year" output.check
  810.   new.block
  811.   format.btitle "title" output.check
  812.   format.bvolume output
  813.   format.number.series output
  814.   address empty$
  815.     { editor empty$
  816.     { publisher new.sentence.checka }
  817.     { organization publisher new.sentence.checkb
  818.       organization output
  819.     }
  820.       if$
  821.       publisher output
  822.     }
  823.     { address output.nonnull
  824.       new.sentence
  825.       editor empty$
  826.     'skip$
  827.     { organization output }
  828.       if$
  829.       publisher output
  830.     }
  831.   if$
  832.   new.block
  833.   note output
  834.   fin.entry
  835. }
  836.  
  837. FUNCTION {techreport}
  838. { output.bibitem
  839.   format.authors "author" output.check
  840.       format.date "year" output.check
  841.   new.block
  842.   format.title "title" output.check
  843.   new.block
  844.   format.tr.number output.nonnull
  845.   institution "institution" output.check
  846.   address output
  847.   new.block
  848.   note output
  849.   fin.entry
  850. }
  851.  
  852. FUNCTION {unpublished}
  853. { output.bibitem
  854.   format.authors "author" output.check
  855.   format.date "year" output.check
  856.   new.block
  857.   format.title "title" output.check
  858.   new.block
  859.   note "note" output.check
  860.   fin.entry
  861. }
  862.  
  863. FUNCTION {default.type} { misc }
  864.  
  865. MACRO {jan} {"January"}
  866.  
  867. MACRO {feb} {"February"}
  868.  
  869. MACRO {mar} {"March"}
  870.  
  871. MACRO {apr} {"April"}
  872.  
  873. MACRO {may} {"May"}
  874.  
  875. MACRO {jun} {"June"}
  876.  
  877. MACRO {jul} {"July"}
  878.  
  879. MACRO {aug} {"August"}
  880.  
  881. MACRO {sep} {"September"}
  882.  
  883. MACRO {oct} {"October"}
  884.  
  885. MACRO {nov} {"November"}
  886.  
  887. MACRO {dec} {"December"}
  888.  
  889. MACRO {acmcs} {"ACM Computing Surveys"}
  890.  
  891. MACRO {acta} {"Acta Informatica"}
  892.  
  893. MACRO {cacm} {"Communications of the ACM"}
  894.  
  895. MACRO {ibmjrd} {"IBM Journal of Research and Development"}
  896.  
  897. MACRO {ibmsj} {"IBM Systems Journal"}
  898.  
  899. MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
  900.  
  901. MACRO {ieeetc} {"IEEE Transactions on Computers"}
  902.  
  903. MACRO {ieeetcad}
  904.  {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
  905.  
  906. MACRO {ipl} {"Information Processing Letters"}
  907.  
  908. MACRO {jacm} {"Journal of the ACM"}
  909.  
  910. MACRO {jcss} {"Journal of Computer and System Sciences"}
  911.  
  912. MACRO {scp} {"Science of Computer Programming"}
  913.  
  914. MACRO {sicomp} {"SIAM Journal on Computing"}
  915.  
  916. MACRO {tocs} {"ACM Transactions on Computer Systems"}
  917.  
  918. MACRO {tods} {"ACM Transactions on Database Systems"}
  919.  
  920. MACRO {tog} {"ACM Transactions on Graphics"}
  921.  
  922. MACRO {toms} {"ACM Transactions on Mathematical Software"}
  923.  
  924. MACRO {toois} {"ACM Transactions on Office Information Systems"}
  925.  
  926. MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
  927.  
  928. MACRO {tcs} {"Theoretical Computer Science"}
  929.  
  930. READ
  931.  
  932. STRINGS { longest.label }
  933.  
  934. INTEGERS { number.label longest.label.width }
  935.  
  936. FUNCTION {initialize.longest.label}
  937. { "" 'longest.label :=
  938.   #1 'number.label :=
  939.   #0 'longest.label.width :=
  940. }
  941.  
  942. FUNCTION {longest.label.pass}
  943. { number.label int.to.str$ 'label :=
  944.   number.label #1 + 'number.label :=
  945.   label width$ longest.label.width >
  946.     { label 'longest.label :=
  947.       label width$ 'longest.label.width :=
  948.     }
  949.     'skip$
  950.   if$
  951. }
  952.  
  953. EXECUTE {initialize.longest.label}
  954.  
  955. ITERATE {longest.label.pass}
  956.  
  957. FUNCTION {begin.bib}
  958. { preamble$ empty$
  959.     'skip$
  960.     { preamble$ write$ newline$ }
  961.   if$
  962.   "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  963. }
  964.  
  965. EXECUTE {begin.bib}
  966.  
  967. EXECUTE {init.state.consts}
  968.  
  969. ITERATE {call.type$}
  970.  
  971. FUNCTION {end.bib}
  972. { newline$
  973.   "\end{thebibliography}" write$ newline$
  974. }
  975.  
  976. EXECUTE {end.bib}
  977.